<template>
  <div class="my-infor">
    <div class="imga">
      <img :src="avatar" />
    </div>
    <div class="tite">
      <div>
        <p class="p1">{{ title }}</p>
        <p class="p2">{{ deta }}</p>
      </div>
      <div style="width: 580px">
        <p class="p3">
          <i>{{ time }}</i>
          <a href="">[查看全文]</a>
        </p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    avatar: {
      // 声明属性，指定需要显示的头像路径
      type: String,
      default: "",
    },
    title: {
      // 声明属性，指定需要显示的标题
      type: String,
      default: "默认标题",
    },
    deta: {
      // 声明属性，指定需要显示的昵称
      type: String,
      default: "默认昵称",
    },
    time: {
      type: String,
      default: "时间",
    },
  },
};
</script>

<style lang="scss" scoped>
.my-infor {
  width: 800px;
  margin: 10px auto;
  padding: 20px 0;
  display: flex;
  border-bottom: 1px dashed #ddd;

  .imga img {
    width: 170px;
    height: 110px;
    margin: 0 10px;
  }

  .tite {
    margin: 0 10px;
  }
  .tite .p1 {
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
  }
  .tite .p1:hover {
    color: red;
    text-decoration: underline;
  }
  .tite .p2 {
    line-height: 20px;
    margin-top: 10px;
    color: #808080;
    height: 60px;
    overflow: hidden;
    text-align: justify;
  }
  .tite .p3 {
    color: #b2b2b2;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    user-select: none;
  }
  .tite .p3 a {
    color: #29aae3;
  }
  .tite .p3 a:hover {
    text-decoration: underline;
  }
}
</style>
